Optimal. Leaf size=156 \[ \frac {a \sin (e+f x) \, _2F_1\left (\frac {1}{2},-\frac {n p}{2};\frac {1}{2} (2-n p);\cos ^2(e+f x)\right ) \left (c (d \sec (e+f x))^p\right )^n}{f n p \sqrt {\sin ^2(e+f x)}}-\frac {a \sin (e+f x) \cos (e+f x) \, _2F_1\left (\frac {1}{2},\frac {1}{2} (1-n p);\frac {1}{2} (3-n p);\cos ^2(e+f x)\right ) \left (c (d \sec (e+f x))^p\right )^n}{f (1-n p) \sqrt {\sin ^2(e+f x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.15, antiderivative size = 156, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 4, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.160, Rules used = {3948, 3787, 3772, 2643} \[ \frac {a \sin (e+f x) \, _2F_1\left (\frac {1}{2},-\frac {n p}{2};\frac {1}{2} (2-n p);\cos ^2(e+f x)\right ) \left (c (d \sec (e+f x))^p\right )^n}{f n p \sqrt {\sin ^2(e+f x)}}-\frac {a \sin (e+f x) \cos (e+f x) \, _2F_1\left (\frac {1}{2},\frac {1}{2} (1-n p);\frac {1}{2} (3-n p);\cos ^2(e+f x)\right ) \left (c (d \sec (e+f x))^p\right )^n}{f (1-n p) \sqrt {\sin ^2(e+f x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2643
Rule 3772
Rule 3787
Rule 3948
Rubi steps
\begin {align*} \int \left (c (d \sec (e+f x))^p\right )^n (a+a \sec (e+f x)) \, dx &=\left ((d \sec (e+f x))^{-n p} \left (c (d \sec (e+f x))^p\right )^n\right ) \int (d \sec (e+f x))^{n p} (a+a \sec (e+f x)) \, dx\\ &=\left (a (d \sec (e+f x))^{-n p} \left (c (d \sec (e+f x))^p\right )^n\right ) \int (d \sec (e+f x))^{n p} \, dx+\frac {\left (a (d \sec (e+f x))^{-n p} \left (c (d \sec (e+f x))^p\right )^n\right ) \int (d \sec (e+f x))^{1+n p} \, dx}{d}\\ &=\left (a \left (\frac {\cos (e+f x)}{d}\right )^{n p} \left (c (d \sec (e+f x))^p\right )^n\right ) \int \left (\frac {\cos (e+f x)}{d}\right )^{-n p} \, dx+\frac {\left (a \left (\frac {\cos (e+f x)}{d}\right )^{n p} \left (c (d \sec (e+f x))^p\right )^n\right ) \int \left (\frac {\cos (e+f x)}{d}\right )^{-1-n p} \, dx}{d}\\ &=\frac {a \, _2F_1\left (\frac {1}{2},-\frac {n p}{2};\frac {1}{2} (2-n p);\cos ^2(e+f x)\right ) \left (c (d \sec (e+f x))^p\right )^n \sin (e+f x)}{f n p \sqrt {\sin ^2(e+f x)}}-\frac {a \cos (e+f x) \, _2F_1\left (\frac {1}{2},\frac {1}{2} (1-n p);\frac {1}{2} (3-n p);\cos ^2(e+f x)\right ) \left (c (d \sec (e+f x))^p\right )^n \sin (e+f x)}{f (1-n p) \sqrt {\sin ^2(e+f x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.21, size = 124, normalized size = 0.79 \[ \frac {a \sqrt {-\tan ^2(e+f x)} \csc (e+f x) \left (c (d \sec (e+f x))^p\right )^n \left (n p \, _2F_1\left (\frac {1}{2},\frac {1}{2} (n p+1);\frac {1}{2} (n p+3);\sec ^2(e+f x)\right )+(n p+1) \cos (e+f x) \, _2F_1\left (\frac {1}{2},\frac {n p}{2};\frac {n p}{2}+1;\sec ^2(e+f x)\right )\right )}{f n p (n p+1)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.96, size = 0, normalized size = 0.00 \[ {\rm integral}\left ({\left (a \sec \left (f x + e\right ) + a\right )} \left (\left (d \sec \left (f x + e\right )\right )^{p} c\right )^{n}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (a \sec \left (f x + e\right ) + a\right )} \left (\left (d \sec \left (f x + e\right )\right )^{p} c\right )^{n}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 1.22, size = 0, normalized size = 0.00 \[ \int \left (c \left (d \sec \left (f x +e \right )\right )^{p}\right )^{n} \left (a +a \sec \left (f x +e \right )\right )\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (a \sec \left (f x + e\right ) + a\right )} \left (\left (d \sec \left (f x + e\right )\right )^{p} c\right )^{n}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int {\left (c\,{\left (\frac {d}{\cos \left (e+f\,x\right )}\right )}^p\right )}^n\,\left (a+\frac {a}{\cos \left (e+f\,x\right )}\right ) \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ a \left (\int \left (c \left (d \sec {\left (e + f x \right )}\right )^{p}\right )^{n}\, dx + \int \left (c \left (d \sec {\left (e + f x \right )}\right )^{p}\right )^{n} \sec {\left (e + f x \right )}\, dx\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________